<template>
  <div class="home">
    <!-- 路由出口 -->
    <router-view></router-view>
    <div>
      <van-tabbar
        v-if="$route.meta.needTab"
        active-color="#e40137"
        inactive-color="#b4bd"
        placeholder
        route
        class="tabbar"
      >
        <van-tabbar-item to="/home/company">
          <template #default>
            <div>
              公司
            </div>
          </template>
          <template #icon>
            <i class="iconfont">&#xe63d;</i>
          </template>
        </van-tabbar-item>
        <van-tabbar-item to="/home/question">
          <template #default>
            <div>
              刷题
            </div>
          </template>
          <template #icon>
            <i class="iconfont">&#xe63f;</i>
          </template>
        </van-tabbar-item>
        <van-tabbar-item to="/home/find">
          <template #default>
            <div>
              发现
            </div>
          </template>
          <template #icon>
            <i class="iconfont">&#xe644;</i>
          </template>
        </van-tabbar-item>
        <van-tabbar-item to="/home/my">
          <template #default>
            <div>
              我的
            </div>
          </template>
          <template #icon>
            <i class="iconfont">&#xe645;</i>
          </template>
        </van-tabbar-item>
      </van-tabbar>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {}
  }
}
</script>

<style lang="less">
.home {
  .tabbar {
    height: 60px;
    .iconfont {
      font-size: 28px;
    }
  }
}</style
>>
